projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc26b7b
)
ARM: uniphier: add sg_set_iectrl() function
author
Masahiro Yamada
<
[email protected]
>
Fri, 18 Mar 2016 07:41:50 +0000
(16:41 +0900)
committer
Masahiro Yamada
<
[email protected]
>
Wed, 23 Mar 2016 16:45:21 +0000
(
01:45
+0900)
This helper function would be useful for new SoCs with per-pin
input enable controlling, such as PH1-LD20, PH1-LD11, etc.
Signed-off-by: Masahiro Yamada <
[email protected]
>
arch/arm/mach-uniphier/sg-regs.h
patch
|
blob
|
history
diff --git
a/arch/arm/mach-uniphier/sg-regs.h
b/arch/arm/mach-uniphier/sg-regs.h
index 3a535c70b2d9534f2e2cfbe4a64e81951dcb1071..2cdc2db26efb2fa919a544d857cee3f3b507cdd2 100644
(file)
--- a/
arch/arm/mach-uniphier/sg-regs.h
+++ b/
arch/arm/mach-uniphier/sg-regs.h
@@
-115,6
+115,17
@@
static inline void sg_set_pinsel(unsigned pin, unsigned muxval,
writel(tmp, reg);
}
+static inline void sg_set_iectrl(unsigned pin)
+{
+ unsigned bit = pin % 32;
+ unsigned long reg = SG_IECTRL + pin / 32 * 4;
+ u32 tmp;
+
+ tmp = readl(reg);
+ tmp |= 1 << bit;
+ writel(tmp, reg);
+}
+
#endif /* __ASSEMBLY__ */
#endif /* ARCH_SG_REGS_H */